<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
	<xsl:output method="xml" encoding="ISO-8859-1"
		doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
		indent="yes" />
	<xsl:param name="rootPath" />
	<xsl:template match="/">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<meta name="keywords" content="" />
				<meta name="description" content="" />
				<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
				<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
				<title>Team.fr</title>
				<link href="{$rootPath}/style.css" rel="stylesheet" type="text/css"
					media="screen" />
			</head>
			<body>
				<div id="wrapper">
					<div id="header" class="container">
						<div id="logo">
							<h1>
								<a href="./">Team.fr</a>
							</h1>
							<p>le meilleur site footballistique du monde</p>
						</div>
					</div>
					<!-- end #header -->
					<div id="page" class="container">
						<div id="content">
							<xsl:apply-templates />
							<div style="clear: both;">
								<xsl:text> </xsl:text>
							</div>
						</div>
						<!-- end #content -->
						<div style="clear: both;">
							<xsl:text> </xsl:text>
						</div>
					</div>
					<!-- end #page -->
				</div>

				<div id="footer">
				</div>
				<!-- end #footer -->
			</body>
		</html>

	</xsl:template>

	<xsl:template match="club">
		<div class="post">
			<h2 class="title">
				<a href="">
					<xsl:value-of select="name" />
				</a>
			</h2>
			<div style="clear: both;">
				<xsl:text> </xsl:text>
			</div>
			<div class="entry">
				<table>
					<tr>
						<td>Fondé en :</td>
						<td>
							<xsl:value-of select="@establishment" />
						</td>
					</tr>
					<tr>
						<td>Président :</td>
						<td>
							<xsl:value-of select="president/lastName" />
							<xsl:text> </xsl:text>
							<xsl:value-of select="president/firstName" />
						</td>
					</tr>
					<tr>
						<td>Entraineur :</td>
						<td>
							<xsl:value-of select="coach/lastName" />
							<xsl:text> </xsl:text>
							<xsl:value-of select="coach/firstName" />
						</td>
					</tr>
				</table>

				<div style="clear: both;">
					<xsl:text> </xsl:text>
				</div>
				<xsl:apply-templates select="players" />

			</div>
		</div>
	</xsl:template>

	<xsl:template match="players">
		<table class="playersList">
			<thead>
				<tr>
					<th>N°</th>
					<th>Nom</th>
					<th>Prenom</th>
					<th>Nationalite</th>
					<th>Age</th>
					<th>Poste</th>
					<th>Taille</th>
					<th>Poids</th>
				</tr>
			</thead>
			<tbody>
				<xsl:for-each select="player">
					<xsl:sort select="position" />
					<xsl:sort select="lastName" />
					<xsl:sort select="firstName" />
					<tr>
						<td>
							<span class="player"><img src="{$rootPath}/images/{@id}.jpg" /></span>
							<xsl:value-of select="@number" />
						</td>
						<td>
							<xsl:value-of select="lastName" />
						</td>
						<td>
							<xsl:value-of select="firstName" />
						</td>
						<td>
							<xsl:value-of select="nationality" />
						</td>
						<td>
							<xsl:value-of select="age" />
						</td>
						<td>
							<xsl:value-of select="position" />
						</td>
						<td>
							<xsl:value-of select="@height" />
						</td>
						<td>
							<xsl:value-of select="@weight" />
						</td>
					</tr>
				</xsl:for-each>
			</tbody>
		</table>


	</xsl:template>

</xsl:stylesheet>
